import { configureStore } from "@reduxjs/toolkit";
import { useSelector, TypedUseSelectorHook } from 'react-redux';
import LoginReducer from "./slices/login";
import UserReducer from "./slices/user";

const store = configureStore({
  reducer: {
    login: LoginReducer,
    user: UserReducer,
  },
});

type RootState = ReturnType<typeof store.getState>;
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
export default store;
